package io.bdmc.modules.bss.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import io.bdmc.common.utils.MyMap;
import io.bdmc.common.utils.MyPage;
import io.bdmc.common.utils.R;
import io.bdmc.modules.bss.entity.SmkMessage;
import io.bdmc.modules.bss.model.MsgLogParam;
import io.bdmc.modules.bss.service.ISmkMessageService;
/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author HuangLu
 * @since 2019-03-07
 */
@RestController
@RequestMapping("/bss/msglog")
public class SmkMessageController {
    @Autowired
    private ISmkMessageService _msgSvs;


    @RequestMapping("/list")
    public R list(MsgLogParam params) {
        MyPage<SmkMessage> myPage = new MyPage<SmkMessage>(params.getCurrent(), params.getSize());
        MyPage<SmkMessage> map = _msgSvs.mySelectPage(myPage, params);
        return R.ok().putData(MyMap.ok(map.getRecords(), map.getTotal()));
    }
}
